<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->params['static'].'assets/js/bootbox.min.js',2); ?>

<div class="page-header">
							<h1>
							综合素质条目添加
							</h1>
</div>
<div class="row">
  <div class="col-xs-12">
			<div class="row">
										<div class="tabbable">
											<ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab4">
												<li class="active">
													<a data-toggle="tab" href="#form1"><i class="icon-edit"></i>添加综合素质</a>
												</li>
                                                <li class="">
													<a data-toggle="tab" href="#form2"><i class="icon-list"></i>&nbsp;已添加的综合素质条目</a>
												</li>
											</ul>

											<div class="tab-content">
												<div id="form1" class="tab-pane active">
												  <?php echo $this->renderPartial("_addintegrationitem");?>
												</div>
                                                <div id="form2" class="tab-pane">
													<?php echo $this->renderPartial("_integrationitemlist",array('intes'=>$intes,'pages'=>$pages));?>
												</div>
												
												
											</div>
										</div>
			</div>
		</div>
</div>
<script type="text/javascript">
  jQuery(function(){
	  <?php
     if(Yii::app()->user->hasFlash('add')){
		 echo 'bootbox.alert("'.Yii::app()->user->getFlash('add').'",function(){});';
	 }
  ?>
	$('[delete-inte]').on('click',function(){
		var id = $(this).attr('delete-inte');
		bootbox.confirm('确定要删除吗？',function(result){
			if(result){
					$.post("<?php echo Yii::app()->createUrl('gsp/deleteinte'); ?>",{'inteId':id},function(data){
						data = $.parseJSON(data);
						bootbox.alert(data['msg'],function(){
							
						   if(data['code'] == '200'){
							   $('#'+id).fadeToggle('800','linear',function(){
											$(this).remove();
								 });
							   
						   }				   
						});
						
					});
			}
		});
		
	});  
  })
  
</script>